package ru.tatintec.gwttest.shared;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class Employee implements Serializable {

	public static final Employee create(String firstName, String lastName, String middleName,
			Sex sex, Date birthday, Date employmentDate) {
		Employee instance = new Employee();
		instance.firstName = firstName;
		instance.lastName = lastName;
		instance.middleName = middleName;
		instance.sex = sex;
		instance.birthday = birthday;
		instance.employmentDate = employmentDate;
		return instance;
	}

	private String id;
	private String firstName;
	private String lastName;
	private String middleName;
	private Sex sex;
	private Date birthday;
	private Date employmentDate;	
	
	public enum Sex { MALE, FEMALE, OTHER }

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getMiddleName() {
		return middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public Sex getSex() {
		return sex;
	}

	public void setSex(Sex sex) {
		this.sex = sex;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public Date getEmploymentDate() {
		return employmentDate;
	}

	public void setEmploymentDate(Date employmentDate) {
		this.employmentDate = employmentDate;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
		
	public String getLFM() {
		return this.getLastName()+" "+this.getFirstName()+" "+this.getMiddleName();
	}
}
